import React from 'react';
import axios from 'axios';
class Page1 extends React.Component {
    render = () => {
        return <h1>{this.showVersion()}</h1>
    }
    showVersion(){

        /*
        this.props.history.push("/page2", {
            dotData: {}

        });*/

        axios.post('http://localhost:3000/api/data', { key: 'value' })
            .then(response => {
                console.log('Response:', response.data);
            })
            .catch(error => {
                console.error('Error:', error);
            });


        return navigator.appCodeName + " " + navigator.appVersion
    }
}


export default Page1